<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
    <style>
        .left{
            float: left;
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .right{
            float: right;
            background-color: red;
            width: 200px;
            height: 200px;
        }
    </style>
</head>
<body>
    <div class="left">
        1
    </div>
    <div class="right">
        2
    </div>
</body>
</html>